package com.csw.foodRecommendation.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.csw.foodRecommendation.dao.Cate1Dao;
import com.csw.foodRecommendation.entity.Cate1;

/**
 * @author 1
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class Cate1ServiceImpl implements Cate1Service {
	@Autowired
	private Cate1Dao cate1Dao;

	@Override
	public void add(Cate1 cate1) {
		cate1Dao.add(cate1);
	}

	@Override
	public List<Cate1> queryAll() {
		return cate1Dao.queryAll();
	}

	@Override
	public List<Cate1> queryAllByName(String name) {
		return cate1Dao.queryAllByName(name);
	}
}
